﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PROD_USED_AMOUNT_TEMP
// * CreateDate    : 2013-02-16 15:19:19
// * Creater       : CodeSmith
// * LastChangeDate: 2013-02-16 15:19:19
// * LastChanger   : 2013-02-16 15:19:19
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class ProdUsedAmountTempEntity : EntityBase
    {
        public ProdUsedAmountTempTable TableSchema
        {
            get
            {
                return ProdUsedAmountTempTable.Current;
            }
        }

        public ProdUsedAmountTempEntity()
        {

        }

        public ProdUsedAmountTempEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.WorkingOrderId = Convert.ToString(CommonFunctions.ToObject(dr["WORKING_ORDER_ID"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.ParentWorkingOrderId = Convert.ToString(CommonFunctions.ToObject(dr["PARENT_WORKING_ORDER_ID"]));
            this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
        }

        public ProdUsedAmountTempEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.WorkingOrderId = Convert.ToString(CommonFunctions.ToObject(dr["WORKING_ORDER_ID"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.ParentWorkingOrderId = Convert.ToString(CommonFunctions.ToObject(dr["PARENT_WORKING_ORDER_ID"]));
            this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return ProdUsedAmountTempTable.Current;
            }
        }

        #region Perporty List
        public string WorkingOrderId
        {
            get { return Convert.ToString(GetData(ProdUsedAmountTempTable.C_WORKING_ORDER_ID)); }
            set { SetData(ProdUsedAmountTempTable.C_WORKING_ORDER_ID, value); }
        }

        public string ProductId
        {
            get { return Convert.ToString(GetData(ProdUsedAmountTempTable.C_PRODUCT_ID)); }
            set { SetData(ProdUsedAmountTempTable.C_PRODUCT_ID, value); }
        }

        public string ParentWorkingOrderId
        {
            get { return Convert.ToString(GetData(ProdUsedAmountTempTable.C_PARENT_WORKING_ORDER_ID)); }
            set { SetData(ProdUsedAmountTempTable.C_PARENT_WORKING_ORDER_ID, value); }
        }

        public decimal Qty
        {
            get { return Convert.ToDecimal(GetData(ProdUsedAmountTempTable.C_QTY)); }
            set { SetData(ProdUsedAmountTempTable.C_QTY, value); }
        }

        #endregion
    }


}

